package Data;

import java.sql.Timestamp;

/**
 * A class that represents the state of a single saved game.
 * The class does not contain actual data of the game, only meta-data, and
 * is used to load the data into the more complex Game class.
 */
public class GameInfo 
{
	private int id;
	private int stateId;
	private int player1Id;
	private int player2Id;
	private Timestamp startTime;
	
	/**
	 * Constructs a GameInfo instance.
	 * 
	 * @param id ID of the game
	 * @param stateId Game state ID of the latest save
	 * @param player1Id ID of the first player
	 * @param player2Id ID of the second player
	 * @param startTime Timestamp of the beginning of the game
	 */
	public GameInfo(int id, int stateId, int player1Id, int player2Id, Timestamp startTime)
	{
		this.id = id;
		this.stateId = stateId;
		this.player1Id = player1Id;
		this.player2Id = player2Id;
		this.startTime = startTime;
	}
	
	public int getId()
	{
		return id;
	}
	
	public int getStateId()
	{
		return stateId;
	}
	
	public int getPlayer1Id()
	{
		return player1Id;
	}
	
	public int getPlayer2Id()
	{
		return player2Id;
	}
	
	public Timestamp getStartTime()
	{
		return startTime;
	}
}

